<?php
namespace app\wxapp\controller;

use think\Cache;

class StoreBase extends Base{

    protected $company = null;

    /**
     * 检查商家是否登录
     */
    public function _initialize(){
        parent::_initialize();
        $login_data = Cache::get($this->token['openid']);
        if(empty($login_data['company'])){
            $this->error("你还没有登录",'',['type'=>'not_login']);
        }

        $this->company = $login_data['company'];
    }
}